<?php
	include 'author.php';
	$user   = $_GET["user"];
	$index  = $_GET["index"];

	// 나의 메시지 가져오기
	$query 	= "SELECT message FROM app_sb_msg WHERE receiver='$user' and idx='$index'";
	$result = mysql_query($query) or die(mysql_error());

	$output = "{\"mymessage\":[";
	while($data = mysql_fetch_array($result))
	{
		$output .= "{\"message\":\"$data[0]\"}";
	}
	$output .= "]}";

	echo "$output";
	mysql_close($dbConn);
?>